﻿#ifndef Robot_H
#define Robot_H
#include "CPublicData.h"
#include "CModBusOper.h"
#include "CMeasurePoint.h"
#include <QWidget>
#include "CDevBase.h"
#include "CWorkMngAutoHy.h"
#include "CRBaseData.h"
#include "URobotMainUi.h"
#include "CLogOper.h"
#include "CRobFactHy.h"
class  Robot
{
public:
    Robot();
	Robot(QString sName, QString sId, QString sConfig);   //获取设备
	Robot(QString sName, QString sId, CDevDataBase *DevData);    //创建设备
	~Robot();
	bool startDevice();     //启动设备
	bool stopDevice();      //停止设备
	QWidget* getDeviceConfigUi();
	QWidget* getMainUi();
	QWidget* getPanel(int nId);    //获取指定面板
	QVector<QWidget *>getPanelList(); //获取面板列表
	QList<CMeasurePoint*> getMeasurePoints();
	void addDev();                      //创建设备
	void deleteDevice();                               //删除设备
public:
	QString        m_sName;
	QString        m_sId;
	CDevDataBase * m_pDevData;
	CDevBase     * m_pRobDev;
	CRBaseData   * m_pBaseData;
	CWorkMngrBase* m_pWorkMngrBase;
	URobMainBase * m_pRobMainUi;
	CPointMgrBase* m_pPointMgrBase;
private:
	void init();                        //设备初始化
private:
	int     m_nType;                    //设备类型
	QString m_sGuid;
	QString m_sConfig;
	CModBusOper * m_pMod;
	QWidget     * m_pConfoig;           //配置界面
	CRobFactHy  * m_pRobFactHy;         //创建工厂
};
#endif